package com.netty.cn.model.MoreClient;

import com.netty.cn.rpc.jboss.RpcJbossServer;

/**
 * 
 * @author wangzonghui
 * @date 2021-07-28 10:16:05
 * @Description 启动多个服务
 */
public class MoreServer {
	
	public static void main(String[] args) {
		
		//启动8080 服务
		new Thread() {
			public void run() {
				
				int port = 8080;
				System.out.println(port+" Server Start");
				try {
					new RpcJbossServer().bind(port);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			};
		}.start();
		
		
		//启动9090服务
		new Thread() {
			public void run() {
				int port = 9090;
				System.out.println(port+" Server Start");
		        try {
					new RpcJbossServer().bind(port);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			};
		}.start();
	}

}
